﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Imaginecup.recycling.Object.Entity;
using Microsoft.Xna.Framework.Graphics;
using Imaginecup.util;
using Microsoft.Xna.Framework.Input;
using Imaginecup.Recycling.GameMan;
using Imaginecup.Engine;

namespace Imaginecup.recycling.Object.Menu
{
    
    public class MenuItem : MenuComponent
    {
        private MapState m_State;
        #region 생성자 오버로딩
        public MenuItem(Vector2 position, Rectangle collisionRect)
        {
            m_Info = new ObjectInfo(position, collisionRect);
        }
        public MenuItem(Texture2D texture, Vector2 position, Rectangle collisionRect, MapState state)
        {
            m_Info = new ObjectInfo(position, collisionRect);
            m_Texture = texture;
            m_State = state;
        }

        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            if (m_Texture != null)
            {
                spriteBatch.Begin();
                spriteBatch.Draw(m_Texture, m_Info.WorldLocation, m_Info.SourceRectangle, Color.White);
                spriteBatch.End();
            }
        }
        #endregion

        // Return : 현재 아이템의 상태
        public override MapState GetItemID()
        {
            return m_State;
        }
    }
}
